/**
 * desc: 教师首页接口
 */

import request from '@/static/uitls/request.js'

// 首页资讯分类列表
const getTCateList = () => {
	return request({
		url: '/teacher/v1/infomation/cate',
		method: 'GET'
	})
}

// 获取协议内容
const getTAgreement = () => {
	return request({
		url: '/teacher/v1/user/agreement',
		method: 'GET'
	})
}

// 开启、关闭接单
const setTOnline = () => {
	return request({
		url: '/teacher/v1/user/online',
		method: 'GET'
	})
}

// 授课信息语种列表
const getTLanguageList = () => {
	return request({
		url: '/teacher/v1/language/index',
		method: 'GET'
	})
}

// 公告列表
const getNoticeList = (page=1,size=10) => {
	return request({
		url: '/teacher/v1/notice/index',
		method: 'GET',
		data:{
			page:page,
			size:size
		}
	})
}

//语种等级
const getLanguageGrade = (id)=>{
  return request({
    url: '/teacher/v1/language/grade?language_id='+id,
    method: 'GET'
  })
}

//授课阶段
const getLanguageStage = ()=>{
  return request({
    url: '/teacher/v1/language/stage',
    method: 'GET'
  })
}

//授课语言
const getLanguageSpeaking = ()=>{
  return request({
    url: '/teacher/v1/language/speaking',
    method: 'GET'
  })
}

//标签
const getCourseTag = ()=>{
  return request({
    url: '/teacher/v1/course/tag',
    method: 'GET'
  })
}

//订单提醒
const getTeacherRemindOrder = (data)=>{
  return request({
    url: '/teacher/v1/remind/order',
    method: 'GET',
	data
  })
}
//订单提醒已读
const getTeacherRrderReading = (id)=>{
  return request({
    url: '/teacher/v1/remind/orderReading?remind_order_id='+id,
    method: 'GET'
  })
}

//课程提醒
const getTeacherRemindCourse = (data)=>{
  return request({
    url: '/teacher/v1/remind/course',
    method: 'GET',
	data
  })
}
//课程提醒已读
const getTeacherCourseReading = (remind_course_id)=>{
  return request({
    url: '/teacher/v1/remind/courseReading?remind_course_id='+remind_course_id,
    method: 'GET'
  })
}
module.exports = {
	getTLanguageList,
	getTAgreement,
	getTCateList,
	setTOnline,
	getNoticeList,
	getLanguageGrade,
	getLanguageStage,
	getLanguageSpeaking,
	getCourseTag,
	getTeacherRemindOrder,
	getTeacherRrderReading,
	getTeacherRemindCourse,
	getTeacherCourseReading
}
